<?php

require_once "Interfaces/AIS_DocCommentTag.php";

/**
 * This class represents tags for restrictions as defined in json schema.
 * Following tags are valid:
 * 
 * -@minimum - This indicates the minimum value for the instance property when the type of the instance value is a number.
 * -@maximum - This indicates the maximum value for the instance property when the type of the instance value is a number.
 * -@minItems -This indicates the minimum number of values in an array when an array is the instance value.
 * -@maxItems - This indicates the maximum number of values in an array when an array is the instance value.
 * -@pattern - When the instance value is a string, this provides a regular expression that a instance string value should match in order to be valid. Regular expressions should follow the regular expression specification from ECMA 262/Perl 5
 * -@maxLength - When the instance value is a string, this indicates maximum length of the string.
 * -@minLength - When the instance value is a string, this indicates minimum length of the string.
 * -@optional - The instance value is optional
 * -@default  - The default value for optional properties
 */
class AIS_DocCommentTagJsonRestriction implements AIS_DocCommentTag
{
	/**
	 * 
	 * @param string $name  the name of this tag
	 * @param string $value the value of this tag
	 */
	public function __construct($name, $value)
	{
		$this->name = trim($name);
		$this->value = trim($value);
	}
	
	private $name;
	private $values = array();

    /**
     * @see AIS_DocCommentTag::getName()
     */
    public function getName()
    {
        return $this->name;
    }
    
    /**
     * @see AIS_DocCommentTag::getValue()
     * 
     * Will always return getValue(0)
     */
    public function getValue($i)
    {
        return $this->value;
    }
	
}

?>